import React from "react";
const withLogging = (WrappedComponent) => {
  return (props) => {
    console.log(`Rendering: ${WrappedComponent.name}`);
    return <WrappedComponent {...props}></WrappedComponent>;
  };
};

const MyComponent = (props) => {
  return <div>高阶组件的例子</div>;
};

const LoggedComponent = withLogging(MyComponent);
export default LoggedComponent;
